import tkinter as tk
mainWindow = tk.Tk()
mainWindow.geometry('640x480')
var1 = tk.IntVar()
var2 = tk.IntVar()
var3 = tk.IntVar()
ColorPanel = tk.Label(mainWindow, width=20, height=5, bg='#ffffff')
def draw(v):    
    global ColorPanel
    r = str(hex(int(var1.get() * 2.25)))[2:].zfill(2)
    g = str(hex(int(var2.get() * 2.25)))[2:].zfill(2)
    b = str(hex(int(var3.get() * 2.25)))[2:].zfill(2)
    clr = '#' + r + g + b
    ColorPanel.configure(bg = clr)
    ColorPanel.pack()

scale1 = tk.Scale(mainWindow, orient=tk.HORIZONTAL, variable=var1, from_=0, to=100, length=300,command = draw)
scale2 = tk.Scale(mainWindow, orient=tk.HORIZONTAL, variable=var2, from_=0, to=100, length=300,command = draw)
scale3 = tk.Scale(mainWindow, orient=tk.HORIZONTAL, variable=var3, from_=0, to=100, length=300,command = draw)


scale1.pack(side = tk.TOP)
scale2.pack(side = tk.TOP)
scale3.pack(side = tk.TOP)
mainWindow.mainloop()
    


